home *** CD-ROM | disk | FTP | other *** search
- Path: tbj.dec.com!diamond
- From: diamond@tbj.dec.com (Norman Diamond)
- Newsgroups: comp.std.c
- Subject: Re: Is a diagnostic required?
- Date: 1 Mar 1996 01:55:51 GMT
- Organization: Digital Equipment Corporation Japan , Tokyo
- Message-ID: <4h5lf7$doc@usenet.pa.dec.com>
- References: <1996Feb23.090526.7591@sq.com> <danpop.824999740@rscernix> <218226403wnr@pires.co.uk>
- Reply-To: diamond@tbj.dec.com (Norman Diamond)
- NNTP-Posting-Host: jit533.tbj.dec.com
-
- In article <218226403wnr@pires.co.uk>, rpp <rpp@pires.co.uk> quotes 100
- lines of other people's text while adding his 6 line reply to 4 lines of
- Mark Brader's text. Mr. Parkins, M.A., please learn to use an editor.
-
- >> it's rather disgusting that none of the compilers Dan tried was smart
- >> and helpful enough to produce the diagnostic anyway -- it would after
- >> all be easy enough for them to do so in this case. (Cancel that remark
- >> if they were all compilers intended to be used with lint for checking.)
-
- > Don't be too unfair to the compiler writers - they're trying to write
- > compilers that accept K&R C as well as ISO C. You may not think this is a
- > good idea, but there's vast amounts of legacy code with K&R header
- > files out there....
-
- Yes, but this was not a header file and the function being invoked was not
- only declared but also defined in the same source file. Compilers in K&R
- days did issue warnings when they could see this kind of mismatch.
-
- > The authors of the standard tried to make it
- > compatible with "current practice" (ie K&R) as far as possible: that is
- > why the declaration of foo() with no parameters is allowed at all.
-
- Agreed. If the function being invoked were not defined in the same source
- file, then the compiler would have no information about the parameters
- actually expected and would still be required to accept this source file.
- --
- << If this were the company's opinion, I would not be allowed to post it. >>
- "I paid money for this car, I pay taxes for vehicle registration and a driver's
- license, so I can drive in any lane I want, and no innocent victim gets to call
- the cops just 'cause the lane's not goin' the same direction as me" - J Spammer
-